/**
 * Project:   dtu.fmes.googleloon
 * File:      TimeOfDay.java
 * License: 
 *            This file is licensed under GNU General Public License version 3
 *            http://www.gnu.org/licenses/gpl-3.0.txt
 *
 * Copyright:	Nicolai Sonne [ NicolaiSonne@hotmail.com.com ]
 * Date:      Dec 11, 2013
 */

package dtu.fmes.loon.singletons;

import java.util.List;

import dtu.fmes.loon.model.Balloon;
import dtu.fmes.loon.model.ConstantBalloonValues;
import dtu.fmes.loon.model.Environment;
import dtu.fmes.loon.model.Simulation;
import dtu.fmes.loon.model.SimulationState;

/**
 * Singleton used for holding current state of simulation
 * 
 * @author Nicolai Sonne
 * 
 */
public class CurrentSimulationStateSingleton {

	private static CurrentSimulationStateSingleton INSTANCE = null;

	public static synchronized CurrentSimulationStateSingleton instance() {
		if (INSTANCE == null) {
			INSTANCE = new CurrentSimulationStateSingleton();
		}
		return INSTANCE;
	}

	private SimulationState simulationState;

	private CurrentSimulationStateSingleton() {
	}

	public List<Balloon> getBalloons() {
		return simulationState.getBalloons();
	}

	public ConstantBalloonValues getConstantBalloonValues() {
		return simulationState.getConstantBalloonValues();
	}

	public Environment getEnvironment() {
		return simulationState.getEnvironment();
	}

	public Simulation getSimulation() {
		return simulationState.getSimulation();
	}

	public SimulationState getSimulationState() {
		return simulationState;
	}

	public void setBalloons(List<Balloon> balloons) {
		simulationState.setBalloons(balloons);
	}

	public void setConstantBalloonValues(ConstantBalloonValues constantBalloonValues) {
		simulationState.setConstantBalloonValues(constantBalloonValues);
	}

	public void setEnvironment(Environment environment) {
		simulationState.setEnvironment(environment);
	}

	public void setSimulation(Simulation simulation) {
		simulationState.setSimulation(simulation);
	}

	public void setSimulationState(SimulationState simulationState) {
		this.simulationState = simulationState;
	}

}
